home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 4.2 / arexx / editor / oz / 1-butt next >
Text File  |  1998-04-16  |  2KB  |  77 lines

  1. /* 1_Butt.rexx V1.3 11/95 -- Butt one pair of audio clips together.             */
  2. /*    >>> modified by Aussie 1995 <<< 
  3.  
  4. designed to work on Flyer versions, 4.1+
  5.  
  6. To use, highlight the second of two AUDIO clips (placed together in a row, then run this ARexx routine.  The second AUDIO clip will be set to immediately start after the first clip ends. (Great for butting music & narration bits back together.)
  7.  
  8. */
  9.  
  10. call remlib('PROJECT_REXX_PORT')
  11. call addlib('PROJECT_REXX_PORT',0)
  12.  
  13. /* --- begin --- */
  14. OK=1
  15. NotOK=0
  16. AudioNext=NotOK
  17. AudioPrev=NotOK
  18.  
  19. start_loc=croutonspot()
  20. if start_loc>0 then do
  21. /* --- Check previous audio clip --- */
  22.    call croutonpick(start_loc-1)
  23.    if croutontype()=" AUD" then AudioPrev=OK
  24. /* --- Check next audio clip --- */
  25.    call croutonpick(start_loc)
  26.    if croutontype()=" AUD" then AudioNext=OK
  27.    end
  28.  
  29. /* --- wait for any screen update delay --- */
  30. call time('R')
  31. do while (time('E')<0.5)
  32.     end
  33.  
  34. call req_open("One Butt (V 1.2) - by Aussie","-----------------------","Butts one SELECTED audio clip","to the end of the PREVIOUS audio clip.")
  35.  
  36. /* --- Kick out if both are not audio clips --- */
  37. if AudioNext~=OK then do
  38.    call req_tell("<<< Sorry, CANCELED! >>>","      The selected clip must be","       an AUDIO ONLY crouton!")
  39.    call req_close()
  40.    call quit1
  41.    end
  42.  
  43. if AudioPrev~=OK then do
  44.    call req_tell("Sorry, CANCELED!","   The previous clip MUST ALSO","          be an audio crouton!")
  45.    call req_close()
  46.    call quit1
  47.    end
  48.  
  49. test = req_tell("Ok to butt this together","        with the last audio clip?")
  50. call req_close()
  51. if test~=OK then call quit()
  52.  
  53. /* ------------- butt them here */
  54. call croutonpick(start_loc-1)
  55. prevstart=croutongettag(Delay)
  56. Last_Time_Mode= croutongettag(TimeMode)  /* Lock to 2=prog time   1=inpoint 0=clip */
  57. nextstart=prevstart+croutongettag(AudioDuration)
  58.  
  59. /* --- set following audio clip start points --- */
  60. call croutonpick(start_loc)
  61. call croutonsettag(Delay,NextStart)
  62. call croutonsettag(TimeMode,Last_Time_Mode)  /* Locking to 2=prog time  1=inpoint   0=clip */
  63.  
  64. /* --- Wrap Up --- */
  65. call projectupdate()
  66. call croutonpick(start_loc)
  67. call req_error(" OZ: Butt is All Done.  Operation was successful ")
  68. call remlib("PROJECT_REXX_PORT")
  69. exit
  70.  
  71. quit:
  72. call req_error(" OZ: Operation was << Canceled >>"," ")
  73.  
  74. quit1:
  75. call remlib("PROJECT_REXX_PORT")
  76. exit
  77.